﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Business;
namespace QLHS
{
    public partial class UCDanhSachHS : UserControl
    {
        public UCDanhSachHS()
        {
            InitializeComponent();
        }
        Lop_BUL l = new Lop_BUL();
        int vt;
        private void btnin_Click(object sender, EventArgs e)
        {
            frm_Report f = new frm_Report(2, "","","");
            f.Show();
        }

        private void btntim_Click(object sender, EventArgs e)
        {
            gridControl1.DataSource = l.TK(vt,textEdit1.Text);
        }

        private void UCDanhSachHS_Load(object sender, EventArgs e)
        {
            textEdit1.Enabled = false;
            gridControl1.DataSource = l.LoadTBHK();
        }

        private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e)
        {
            vt = comboBoxEdit1.SelectedIndex;
            textEdit1.Enabled = true;
            textEdit1.Focus();
        }

        private void btnxem_Click(object sender, EventArgs e)
        {
            UCDanhSachHS_Load(sender,e);
        }
    }
}
